#ifndef __PI_CONT_H
#define __PI_CONT_H

#define  s8   signed char
#define  s16  signed short int
#define	 s32  signed int 
#define	 u8   unsigned char 
#define	 u16  unsigned short int 
#define	 u32  unsigned int  
	
typedef struct 
{ 	
  s32 hKp_Gain;
  s32 hKi_Gain;
  s32 hLower_Limit_Output;     //Lower Limit for Output limitation
  s32 hUpper_Limit_Output;     //Lower Limit for Output limitation
  s32 wLower_Limit_Integral;   //Lower Limit for Integral term limitation
  s32 wUpper_Limit_Integral;   //Lower Limit for Integral term limitation
  s32 wIntegral;
  s32 wPI_Out;
  s32 kisumtemp;
} PID_Components;

extern PID_Components   PID_ID, PID_IQ, PID_SP, PID_PLL, PID_OS;  
extern void 			f_PID_Parameter_Init(void);
extern s32 				PID_CALC(PID_Components *PID_Struct,s32 hReference, s32 hPresentFeedback);


#endif


